<%= form_with model: @blob, url: avo.media_library_path(@blob), method: :patch, class: "pb-6" do |f| %>
  <%= field_container do %>
    <%= avo_edit_field :filename, as: :text, short: true, stacked: true, form: f, required: true %>
    <%= f.fields_for :metadata do |meta_form| %>
      <%= avo_edit_field :title,
        as: :text,
        value: @blob.metadata[:title],
        short: true,
        stacked: true,
        form: meta_form,
        required: true
      %>
      <%= avo_edit_field :alt,
        as: :text,
        value: @blob.metadata[:alt],
        short: true,
        stacked: true,
        form: meta_form
      %>
      <%= avo_edit_field :description,
        as: :textarea,
        value: @blob.metadata[:description],
        short: true,
        stacked: true,
        form: meta_form
      %>
    <% end %>
  <% end %>

  <div class="w-full flex justify-end pr-6">
    <%= a_button type: :submit,
      icon: "avo/save",
      size: :sm,
      style: :outline,
      data: {
      } do %>
      Update
    <% end %>
  </div>
<% end %>
